﻿@model MyBlog2.ViewModels.TagViewModel
@{
    ViewData["Title"] = "标签";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="cl-cantainer container">
    <div class="row" style="align-items:center">
        <div class="col-md-9 cl-left" style="margin-left:auto;margin-right:auto;">
            @* 标签 *@
            <div class="right-card">
                <div class="right-card-main" style="border:1px solid #D4D4D5;">
                    <h5 style="color:#FF9400;padding:10px 0 0 20px;border-bottom:1px solid;border-bottom-color:#D4D4D5;">标签</h5>
                    <ul class="label" style="padding:20px 20px;">
                        @foreach (var tag in Model.Tags)
                        {
                            <li>
                                <a asp-controller="Home" asp-action="Tag" asp-route-id="@tag.Id">
                                    @tag.Name
                                    <span class="badge badge-light" style="font-size: 12px; margin-left: 5px;">@tag.ArticleTag.Count</span>
                                </a>
                            </li>
                        }
                    </ul>
                </div>
            </div>

            @* 文章 *@
            @if (Model.Articles != null)
            {
                @foreach (var art in Model.Articles)
                {
                    <div class="cl-card">
                        <div class="row">
                            <div class="col-lg-12 cl-card-main" style="padding:0 30px 0 30px;line-height:30px;">
                                <h3 class="cl-card-main-title"><a asp-controller="Home" asp-action="Detial" asp-route-id="@art.Id">@art.Title</a></h3>
                                <p class="cl-card-main-info">导读&nbsp; &nbsp; @art.Description</p>
                                <div class="row">
                                    <span style="margin-right:25px;color:#999;font-size:14px;">
                                        <img src="~/images/admin.jpg" style="width: 24px;height: 24px;border-radius: 5px;margin: 0 0 8px 0;" />
                                        ※听雨※
                                    </span>
                                    <span style="margin-right:25px;color:#999;font-size:14px;">
                                        更新时间：@art.UpdateTime
                                    </span>
                                    <span style="margin-right:25px;color:#999;font-size:14px;">
                                        浏览次数：@art.Views
                                    </span>

                                </div>

                            </div>
                        </div>
                    </div>
                }
            }

        </div>
    </div>
</div>
